// mysql配置文件 根据环境变量来配置(真实开发切换地址)
let MY_SQL_CONFIG, My_Redis_CONFIG
if (process.env.NODE_ENV === 'production') {
  MY_SQL_CONFIG = {
    // host: '10.1.8.10',
    host: 'koa2-blog-mysql-1',
    user: 'root',
    password: 'aa123456',
    database: 'blog',
    port: 3306,
  }
  My_Redis_CONFIG = {
    port: 6379,

    // host: '127.0.0.1',
    host: 'koa2-blog-redis-1',
  }
}
if (process.env.NODE_ENV === 'development' || !process.env.NODE_ENV) {
  MY_SQL_CONFIG = {
    // host: '10.1.8.10',
    host: 'koa2-blog-mysql-1',
    user: 'root',
    password: 'aa123456',
    database: 'blog',
    port: 3306,
  }
  My_Redis_CONFIG = {
    port: 6379,
    // host: '127.0.0.1',
    host: 'koa2-blog-redis-1',
  }
}
module.exports = {
  MY_SQL_CONFIG,
  My_Redis_CONFIG,
}
